home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / options.lha / options / Makefile next >
Makefile  |  1993-04-13  |  1KB  |  96 lines

  1. ###
  2. # operating-system dependent stuff
  3. ###
  4. .UNIVERSE=att
  5.  
  6. ###
  7. # target directories
  8. #
  9. #    NOTE: if you change INCDIR and LIBDIR then dont forget to change
  10. #          their corresponding strings at the top of options.3!
  11. ###
  12. LOCAL=/usr/local
  13. INCDIR=${LOCAL}/include
  14. LIBDIR=${LOCAL}/lib
  15. MAN3DIR=/usr/man/local_man/man3
  16.  
  17. ###
  18. # compilation options
  19. ###
  20. CC=CC
  21. CPLC=CC
  22. INCLUDES=-I.
  23. # OPT=-O
  24. OPT=-g
  25. TEST_DEFS=
  26. USR_DEFS=
  27. DEFINES=${OS_DEFS} ${USR_DEFS} ${TEST_DEFS}
  28. OPTIONS=
  29. CFLAGS=${INCLUDES} ${DEFINES} ${OPT} ${OPTIONS}
  30. CPLFLAGS=${OPT} ${INCLUDES} ${DEFINES} ${OPTIONS}
  31.  
  32. ###
  33. # C++ Rules
  34. ###
  35. .SUFFIXES : .C
  36. .C.o : 
  37.     ${CPLC} ${CPLFLAGS} -c $<
  38.  
  39. ###
  40. # Source files
  41. ###
  42. LIBHDRS=options.h
  43. LIBSRCS=options.C
  44. LIBTESTS=testopts.C
  45.  
  46. SRCS=${LIBHDRS} ${LIBSRCS} ${LIBTESTS}
  47. OBJS=options.o
  48. LIBRARY=liboptions.a
  49. DOCS=options.3
  50.  
  51.  
  52. ###
  53. # target dependencies
  54. ###
  55. all: library test
  56.  
  57. install: library
  58.     rm -f ${INCDIR}/options.h ${LIBDIR}/${LIBRARY}
  59.     cp options.h ${INCDIR}/options.h
  60.     cp ${LIBRARY} ${LIBDIR}/${LIBRARY}
  61.  
  62. installman:
  63.     rm -f ${MAN3DIR}/options.3
  64.     cp options.3 ${MAN3DIR}/options.3
  65.  
  66. library: ${LIBRARY}
  67.  
  68. ${LIBRARY}: ${OBJS}
  69.     ar r $@ ${OBJS}
  70.     ranlib $@
  71.  
  72. test: testopts
  73.  
  74. testopts: testopts.o ${LIBRARY}
  75.     ${CPLC} -o $@ testopts.o ${LIBRARY}
  76.  
  77. ###
  78. # maintenance dependencies
  79. ###
  80. clean:
  81.     rm -f *.o core .exrc
  82.  
  83. clobber: clean
  84.     rm -f tags testopts ${LIBRARY}
  85.     
  86. shar:
  87.     shar README MANIFEST ${SRCS} ${DOCS} Makefile >SHAR
  88.  
  89. ###
  90. # object dependencies
  91. ###
  92. options.o: options.h
  93.  
  94. testopts.o: options.h
  95.  
  96.